function addZero (i) {
  if (i < 10) {
    i = "0" + i
  }
  return i
}

export default function formmaData (date) {
  let YY = date.getFullYear() + '-'
  let MM = addZero(date.getMonth() + 1) + "-"
  let DD = addZero(date.getDate()) + " "

  let H = addZero(date.getHours()) + ":"
  let M = addZero(date.getMinutes()) + ":"
  let S = addZero(date.getSeconds()) - 10

  return YY + MM + DD + H + M + S
}

